﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Net;
using System.IO;

namespace AMatysiakTest.Web
{
    [TestClass]
    public class WebSiteTest
    {
        private string url = "http://localhost";

        [TestMethod]
        public void open()
        {
            HttpWebResponse response = AMatysiak.Web.WebSite.Open(url);

            Assert.IsInstanceOfType(response, typeof(HttpWebResponse));
        }

        [TestMethod]
        public void openStream()
        {
            StreamReader response = AMatysiak.Web.WebSite.OpenStream(url);

            Assert.IsInstanceOfType(response, typeof(StreamReader));
        }

        [TestMethod]
        public void readPage()
        {
            string[] page = AMatysiak.Web.WebSite.ReadPage(url);

            Assert.IsInstanceOfType(page, typeof(string[]));
        }
    }
}
